﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RecepcionDocListGrid.ascx.cs" 
Inherits="UILGestion.RecepcionDoc.RecepcionDocListGrid" %>
<%@ Register Assembly="CustomControls" Namespace="CustomControls" TagPrefix="cc1" %>
<script src="../../Scripts/controlGrid.js" type="text/javascript"></script>
<link href="../../css/main.css" rel="stylesheet" type="text/css" />

 <asp:Panel runat="server" ID="PanelRecepcion" >
        
<asp:DataPager ID="pager" PagedControlID="ListView1" runat="server" >
    <Fields>
      <cc1:PagerField NextPageImageUrl="~/Images/arrow_right2.gif" PreviousPageImageUrl="~/images/arrow_left.gif" />
    </Fields>
</asp:DataPager>
<asp:ListView ID="ListView1" runat="server" OnDataBound="ListView1_DataBound" 
    DataKeyNames="idInternal,idObra" onitemdatabound="ListView1_ItemDataBound">
    <LayoutTemplate>
        <table id="itemPlaceHolderContainer" border="0" runat="server" >
            <tr id="Tr1" runat="server" class="ms-crm-List-Header" align="center">
               
                <th id="Th7" runat="server" align="center">
                    <asp:LinkButton ID="LinkButton5" CommandName="Sort" ForeColor="Blue" CommandArgument="numRecepcion" runat="server">FR</asp:LinkButton>
                </th>
                <th id="Th2" runat="server" align="center">
                    <asp:LinkButton ID="LinkButton1" CommandName="Sort" ForeColor="Blue" CommandArgument="fecha" runat="server">FECHA <br /> RECEPCION</asp:LinkButton>
                </th>
                 <th id="Th8" runat="server" align="center">
                    <asp:LinkButton ID="LinkButton6" CommandName="Sort" ForeColor="Blue" CommandArgument="tipoDocumento" runat="server">T/D</asp:LinkButton>
                </th>
                <th id="Th4" runat="server" align="center" >
                    <asp:LinkButton ID="LinkButton2" CommandName="Sort" ForeColor="Blue" CommandArgument="numDocumento" runat="server">DOCUMENTO</asp:LinkButton>
                </th>
                <th id="Th5" runat="server" align="center">
                    <asp:LinkButton ID="LinkButton3" CommandName="Sort" ForeColor="Blue" CommandArgument="proveedor" runat="server">PROVEEDOR</asp:LinkButton>
                </th>
                <th id="Th15" runat="server" align="center">
                    <asp:LinkButton ID="LinkButton14" CommandName="Sort" ForeColor="Blue" CommandArgument="proveedor" runat="server">CONCEPTOP</asp:LinkButton>
                </th>
                <th id="Th6" runat="server" align="center">
                    <asp:LinkButton ID="LinkButton4" CommandName="Sort" ForeColor="Blue" CommandArgument="fechaEmisionDoc" runat="server">FECHA <br /> EMISION</asp:LinkButton>
                </th>
                 <th id="Th1" runat="server" align="center">
                <asp:LinkButton ID="lb2" CommandName="Sort" ForeColor="Blue" CommandArgument="fechaVencimientoDoc" runat="server">FECHA <br /> VENCIMIENTO</asp:LinkButton>
                </th>
                <th id="Th3" runat="server" align="center">
                    <asp:LinkButton ID="lb3" CommandName="Sort" ForeColor="Blue" CommandArgument="moneda" runat="server">MONEDA</asp:LinkButton>
                </th>
                <th id="Th13" runat="server" align="center">
                    <asp:LinkButton ID="LinkButton12" CommandName="Sort" ForeColor="Blue" CommandArgument="totalMonOrig" runat="server">IMPORTE</asp:LinkButton>
                </th>
                <th id="Th14" runat="server" align="center">
                    <asp:LinkButton ID="LinkButton13" CommandName="Sort" ForeColor="Blue" CommandArgument="totalMonOrig" runat="server">T/C</asp:LinkButton>
                </th>
              
                <th id="Th12" runat="server" align="center">
                    <asp:LinkButton ID="LinkButton10" CommandName="Sort" ForeColor="Blue" CommandArgument="numOrdenCompra" runat="server">ORDEN</asp:LinkButton>
                </th>
                <th id="Th9" runat="server" align="center">
                    
                </th>
                                 
            </tr>
            <tr id="itemPlaceholder" runat="server">
            </tr>
        </table>



    </LayoutTemplate>
    <ItemTemplate>
        <tr style='background-color: <%# (Container.DataItemIndex % 2 == 0)?"#eee":"#fff" %>'>
            <td>
              
                <asp:LinkButton runat= "server"   ForeColor="Blue"
                Text='<%# DataBinder.Eval(Container.DataItem,"numRecepcion").ToString()%>'  
                  ID="FR" 
                PostBackUrl='<%# "~/ObraAdmin/RecepcionDoc/RecepcionDocReadForm.aspx?idObra=" + 
                DataBinder.Eval (Container.DataItem,"idObra").ToString() + 
                "&id=" + 
                DataBinder.Eval(Container.DataItem,"idInternal").ToString()%>' 
               />   
               
            </td>
            <td width="70px" >
                    <%# Eval("fechaStr")%> 
            </td>
           
             <td>
                <%# Eval("tipoDocumento")%>
            </td>
              <td>
                <%# Eval("numDocumento")%><br />
            </td>
            <td align="right" width="150px">
            <%# Eval("proveedor")%><br />
                 
            </td>
            <td  width="150px">
            <%# Eval("descripcion")%><br />
                 
            </td>
             <td align="right" width="70px">
            <%# Eval("fechaEmisionDocStr")%><br />
                 
            </td>
             <td align="right" Width="70px">
            <%# Eval("fechaVencimientoDocStr")%><br />
                 
            </td>
                <td align="right" Width="50px">
            <%# Eval("moneda")%><br />
                 
            </td>


           
                <td align="right" Width="70px">
            <%# Eval("totalMonOrigStr")%><br />
                 </td>
                 <td align="right" Width="70px">
            <%# Eval("tipoCambioDollar")%><br />
                 </td>
            
       
            <td Width="100px">

                <asp:LinkButton runat= "server"  ToolTip="Orden de Compra" ForeColor="Blue"
                Text='<%# DataBinder.Eval(Container.DataItem,"numOrdenstr").ToString()%>'  
                 Target="_self"  ID="LinkButton11"
                PostBackUrl='<%# "~/ObraAdmin/OrdenCompras/"+  DataBinder.Eval (Container.DataItem,"tipoFormulario").ToString() + 
                "?id=" + DataBinder.Eval (Container.DataItem,"idOrdenCompra").ToString() + 
                 "&idObra=" + DataBinder.Eval(Container.DataItem,"idObra").ToString()%>' 
               />   
             </td>
             <td>
             
             
                <asp:ImageButton ID="lnkRemove" runat="server" BorderColor="Control"  ToolTip="Elimina el Registro"
                     CommandArgument='<%# Eval("idInternal")%>' ImageUrl="../../Images/delete.gif" 
                     OnClick="Deleteitem" OnClientClick="return confirm('Usted quiere eliminar?')" />
                    
             </td>


           
        </tr>
    </ItemTemplate>
    <EmptyDataTemplate>
        <table id="Table1" runat="server" >
            <tr>
                <td>
                   <h2 style="font-size: x-small; color: #960818">
                        No existe Informacion.</h2>
                </td>
            </tr>
        </table>
    </EmptyDataTemplate>
</asp:ListView>

</asp:Panel>



    
     